<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" style="overflow: hidden;padding: 10px;">
			<div class="edit-btn" style="height:auto;margin-right:0px">
				<div>
					<a href="javascript:void(0);" class="easyui-linkbutton function-btn" iconcls="icon-save" plain="true" >保存</a>
					<a href="javascript:void(0);" class="easyui-linkbutton function-btn" iconcls="icon-cancel" plain="true" >取消</a>	
				</div>
			</div>
  			<form  class="main-form" method="post">	
			 	 	
		    <fieldset>								
					<input name="id" id="id"  type="hidden"/>
				
					 <table>
						 <tr>
						    <th>评分</th>
				
							<td><input id="patient_id" name="patient_id" type="text" class="easyui-textbox easyui-validatebox"/></td>
						 </tr>
					 </table>
				</fieldset>
		</form>
			
			
		
		
	</div>
</div>
<script>

requirejs(['domReady!'],function(doc){
	
	var rootid = 'panel-oa-highvalue'
	var window_id = 'Evalue'
	
	
	$('#'+window_id+' #extend').val(true)
	
	var $dg=$('#'+rootid +' table.dg-list')
	if($dg.length>0){
		
		require(['sysmanMain','deptUserSelect','formServ','msgServ','btnServ'],
			function(main,deptUserSelect,formServ,msgServ,btnServ){
			
			var record = $dg.datagrid('getSelected')
			if(record && record.id){
				$.ajax({
					url:'/'+main.getRootPath()+'/oaHighvalue/query/getExtendOne.action',
					data:{id:record.id},
					success:function(data){
						$('#'+window_id + ' form.main-form').form('clear');
						$('#'+window_id + ' form.main-form').form('load',data);
					}
				})
			}
		
				
			
			//定义响应方法
			var func={
				"保存":function(){
					var $form = $('#'+window_id + ' form.main-form')
					var data = formServ.getDataStr({form:$form})
					$.ajax({
						url:'/'+main.getRootPath()+'/department/saveExtend.action',
						data:data,
						contentType : 'appliction/json;charset=utf-8',
						type :'post',
						success:function(data){
							$form.form('load',data),
							msgServ.Msgslide('保存操作成功');
							
						},
						error:function(){
							msgServ.Msgslide('保存操作失败。。。');							
						}
					})
				}
				,
				"取消" : function() {
					$('#'+window_id).window('close');
				}
				,
				function_btn_listenner : function(e) {

					btnServ.applyButton({buttonEvt:e,buttonConfig:func})
		
				}
			}
			var btn = $('#'+window_id + ' a.function-btn')
			if(btn.length>0){
				btn.unbind('click');
				btn.bind('click',func.function_btn_listenner)
			}	
		})
	}
});	

</script>